﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Characters : MonoBehaviour {

    public bool beStatic = false;
	// Use this for initialization
	protected virtual void Start () {
        if (beStatic)
        {
            UpdateDepth();
        }
	}
	
	// Update is called once per frame
	protected void Update () {
        if (!beStatic)
        {
            UpdateDepth();
        }
    }
    void UpdateDepth()
    {
        Vector3 position = transform.position;
        position.z = position.y;
        transform.position = position;
    }
}
